1. Field of the Invention
The present invention relates to the field of semiconductor devices. More particularly, the present invention relates to a crystal oscillator circuit for a microcontroller.
2. Related Art
Complimentary Metal Oxide Semiconductor (CMOS) microcontroller devices typically include crystal-based oscillators for signal timing. More particularly, CMOS devices typically include a crystal that couples to an oscillator circuit.
It is desirable to obtain an oscillator circuit that has low power consumption. More particularly, it is desirable to obtain oscillator circuits that draw current in the micro amp range or below. However, when the oscillator circuit starts up at a low bias current, the start-up process takes a long time. In addition, if a design were to have an initial low bias current (in the micro amp range or below), it is not clear whether the circuit would start-up. Though a higher current gives a faster start-up, it gives an unacceptably high steady state current draw.
In addition, prior art crystal oscillator circuits are not configurable. Therefore, in order to obtain a different start-up and steady-state conditions an entirely new microcontroller must be designed and manufactured. This is inconvenient and expensive.
What is needed is an oscillator circuit that has low power consumption. More particularly, an oscillator circuit is needed that will draw in the micro amp range or below. In addition, an oscillator circuit is needed that meets the above needs and that will provide sufficient startup current and gain to assure quick initial oscillation of the crystal. In addition, a crystal oscillator circuit is needed that allows for obtaining different start-up and steady-state conditions. The present invention provides a solution to the above needs.
The present invention provides a programmable oscillator circuit that has low power consumption. The oscillator circuit of the present invention has the capability of drawing in the micro amp range or below. In addition, the oscillator circuit of the present invention provides sufficient startup current to quickly start-up oscillation of the crystal.
A crystal oscillator circuit is described that is programmable to provide multiple different levels of startup current. Each of the different levels of startup current are sufficient to obtain start-up. However, by using a higher level startup current, a faster startup is obtained.
In the present embodiment, the crystal oscillator circuit includes logic devices for receiving programming indicating one of a plurality of different startup current levels. In the present embodiment, the logic devices include a decoder, and flip-flops that are adapted to control the startup current level. In the present embodiment, three PMOS devices couple to the decoder and couple to a resistor chain. The PMOS devices are operable in response to input from the decoder to form a current mirror having different levels of current. Thus, the logic devices operate to control the resistance of the current bias circuit such that, upon receiving programming indicating a particular startup current level, the crystal oscillator circuit generates a corresponding startup current.
The crystal oscillator circuit further includes provision for selecting one of a plurality of different levels of capacitance. In addition, the crystal oscillator circuit includes a pass gate that includes circuitry for shorting a first node to a second node for assuring predetermined startup conditions are met.
In one embodiment, a microcontroller is disclosed that includes at least two contact pads for coupling to an external crystal and a crystal oscillator circuit that includes provision for selecting one of a plurality of different levels of startup current for controlling the startup speed of crystal oscillation. In one embodiment, the microcontroller also includes provision for selecting one of a plurality of different levels of capacitance.
A feedback loop that includes an amplifier provides for steady-state operations that have low power consumption. In one embodiment, the feedback loop generates a post-startup current that is reduced(from the startup current level) such that the circuit draws in the micro amp range or below during steady state operations.
The startup conditions have a small effect on the current draw during steady state operations. More particularly, when a higher levels of startup current is chosen(which gives faster startup time), slightly higher current draw results during steady state operations. Consequently, the lower level of current and gain give slower startup times but result in lower power draw during steady state conditions.
By providing multiple different levels of startup current, programmers can choose a startup condition that meets the needs of the circuit""s application. More particularly, the programmer can select a level of startup current that appropriately trades-off startup speed with the effects of start-up speed on the steady state current during steady state operation.
The oscillator circuit of the present invention is programmable to provide multiple different levels of startup current and multiple levels of capacitance. This allows for configuring the startup current and the capacitance according to the needs of the circuit""s application. In addition, the oscillator circuit of the present invention has low power consumption. More particularly, the oscillator circuit of the present invention will draw in the micro amp range or below during steady state operations.
In addition, because the microcontroller of the present invention is programmable, there is no need to design and manufacture a new microcontroller to obtain a different start-up or steady-state conditions. In addition, the microcontroller of the present invention is more manufacturable than prior art microcontrollers because there are more settings that can be adjusted to increase yield.
These and other objects and advantages of the present invention will become obvious to those of ordinary skill in the art after having read the following detailed description of the preferred embodiments that are illustrated in the various drawing figures.